//
//  YXLeaveCell.m
//  CreditCard
//
//  Created by 杨旭 on 2018/1/31.
//  Copyright © 2018年 杨旭. All rights reserved.
//

#import "YXLeaveCell.h"
#import "YXReplyModel.h"
@interface YXLeaveCell ()
/** 文本内容 */
@property (nonatomic , weak) YYLabel *contentLabel;

@end

@implementation YXLeaveCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    // 设置颜色
    self.backgroundColor = [UIColor py_colorWithHexString:@"#EEEEEE"];
    self.contentView.backgroundColor = [UIColor py_colorWithHexString:@"#EEEEEE"];

    // 文本
    YYLabel *contentLabel = [[YYLabel alloc] init];
//    contentLabel.frame = self.contentView.frame;
    contentLabel.numberOfLines = 0 ;
    contentLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:contentLabel];
    self.contentLabel = contentLabel;
    
}

- (void)setModel:(YXReplyModel *)model {
    _model = model;
    _contentLabel.frame = model.contentF;
    _contentLabel.attributedText = _model.attributedText;
}


#pragma mark - override
- (void)setFrame:(CGRect)frame
{
    frame.origin.x = 2*10;
    frame.size.width = kScreenWidth - frame.origin.x - 10;
    [super setFrame:frame];
}
@end
